#{extends 'main.html' /}

#{set 'moreScripts'}
<script src="@{'/public/javascripts/jquery-ui-1.8.10.custom.min.js'}" type="text/javascript" charset="utf-8"></script>
<script src="@{'/public/pager/jquery.pager.js'}" type="text/javascript" charset="utf-8"></script>
<script src="@{'/public/ckeditor/ckeditor.js'}" type="text/javascript" charset="utf-8"></script>
<script src="@{'/public/ckeditor/adapters/jquery.js'}" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="@{'/public/uploadify/swfobject.js'}"></script>
<script type="text/javascript" src="@{'/public/uploadify/jquery.uploadify.v2.1.4.min.js'}"></script>
#{/set}
#{set 'moreStyles'}
<link rel="stylesheet" type="text/css" media="screen" href="@{'/public/pager/Pager.css'}" />
<link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/table.scss'}" />
#{/set}

<style>
<!--


#innercontent{
	font-family: 宋体,Arial Narrow;
	font-size: 1.3em;
	position:relative; 
	left:20%; 
	border:1px solid #CCCCCC;
	width:50%;
	padding:10px;
}

li{
	list-style-type: none; display: list-item;
}

.link:hover {
	padding-left:15px;
	color:#CEAA00;
	font-size:1.3em;
} 


-->
</style>

<script language="javascript">

$(function(){
	//初始化翻页控件。
	$("#pager").pager(
		{
			pagenumber: ${queryBean.currentPage}, 
			pagecount: ${queryBean.totalPage}, 
			totalcount: ${queryBean.totalQuantity},
			buttonClickCallback: PageClick 
		}
	);
});
//翻页功能。
PageClick = function(pageclickednumber) {
	$("#currentPage").val(pageclickednumber);
	doSearch();
}

	//刷新页面
	function doSearch() {
		$("#form1").submit();
	}

</script>


	#{if articleList}  
		<div id="indexcontent">
				<div id="innercontent">
				<ul>
			#{list items:articleList, as:'article'}
				<li style="line-height:20px;">
					<span >
						<img src="@{'/public/images/Users/dot1.jpg'}">
						<a href="@{Articles.show(article.id)}" target="_blank" class="link">
							【${article.createAt.format("MM-dd")}】&nbsp;${article.title}
						</a>
					</span>
				</li>
			#{/list}
		</ul>
			#{form @Articles.index(), name:'form1', id:'form1'}
				<input type="hidden" id="currentPage" name="queryBean.currentPage" value="${queryBean.currentPage}">
				<input type="hidden" id="eachPage" name="queryBean.quantityEachPage" value="15">
	 		#{/form}
			</div>
		</div>			
	#{/if}
	
<br/>
<br/>
<div id="pager" style="font-size:1.3em;float:left;position:relative;left:20%;"></div>
